import request from '@/utils/request'

// 获取分发列表
export function pagingDistributeArticle(query) {
  return request({
    url: '/content/contentArticle/pagingDistributeArticle',
    method: 'get',
    params: query
  })
}

// 文章删除
export function deleteContentArticle(articleId) {
  return request({
    url: '/content/contentArticle/delete',
    method: 'post',
    params: { articleId }
  })
}

// 文章批量删除
export function bacthDeletes(articleIds) {
  return request({
    url: '/content/contentArticle/bacthDeletes',
    method: 'post',
    data: articleIds
  })
}

// 根据文章id 查询文章详情
export function getContentArticle(articleId) {
  return request({
    url: '/content/contentArticle/getContentArticle',
    method: 'get',
    params: { articleId }
  })
}

// 根据分发id 查询分发文章详情
export function getShareArticle(contentId) {
  return request({
    url: '/content/shareArticle/getTemplateList',
    method: 'get',
    params: { contentId }
  })
}

// 根据文章id 查询分发文章详情
export function getContentArticleCode(articleId) {
  return request({
    url: '/content/contentArticle/doContentArticleCode',
    method: 'get',
    params: { articleId }
  })
}

// 保存文章信息
export function saveContentArticle(contentArticle) {
  return request({
    url: '/content/contentArticle/save',
    method: 'post',
    data: contentArticle
  })
}

